#include "../include/Position.h"

Position::Position() {}
Position::Position(int _x, int _y):x(_x), y(_y){}

void Position::setX(int _x){x=_x;}
void Position::setY(int _y){y=_y;}
void Position::setPosition(int _x, int _y){
    x=_x;
    y=_y;
}

int Position::getX() const {return x;}
int Position::getY() const {return y;}
const Position & Position::getPosition() const {return (*this);}

bool Position::operator < (const Position & _p) const {
    return (x < _p.x || (x == _p.x && y < _p.y));
}

ostream & operator << (ostream & flux, const Position & _p) {
    flux<<_p.getX()<<"/"<<_p.getY();
    return flux;
}


